import {useCountStore} from "./CountStore.tsx";
import {builder} from "../../src/storx/decorators/builder.ts";

// const  {user,increment,TestBuilder,count,changeUser} = useCountStore()
// const instance = useCountStore()

export function UserDiv(){
    const instance = useCountStore()
    console .log("=========================user  UserDiv ===================")
    return <div>
        <div>{instance.text}</div>
        <div>{instance.count}</div>
        <div></div>
        <button onClick={instance.changeUser}>changeUser</button>
        <button onClick={instance.updateText}>update</button>
    </div>
}
export function UserDiv2(){
const  {user,increment,TestBuilder,count,changeUser} = useCountStore()
const instance = useCountStore()
    console .log("=========================user  UserDiv2 ===================")
    return <div>
        {count}
        <button onClick={increment}>inicrement</button>
    </div>
}
